import request from "@/utils/request";

// 查询活动管理列表
export function listActivity(query) {
  return request({
    url: "/app/activity/list",
    method: "get",
    params: query,
  });
}

// 查询活动管理详细
export function getActivity(activityId) {
  return request({
    url: "/app/activity/" + activityId,
    method: "get",
  });
}

// 新增活动管理
export function addActivity(data) {
  return request({
    url: "/app/activity",
    method: "post",
    data: data,
  });
}

// 修改活动管理
export function updateActivity(data) {
  return request({
    url: "/app/activity",
    method: "put",
    data: data,
  });
}

// 删除活动管理
export function delActivity(activityId) {
  return request({
    url: "/app/activity/" + activityId,
    method: "delete",
  });
}
//查询活动分类
export function selectAll() {
  return request({
    url: "/app/activityType/selectAll",
    method: "get",
  });
}

export function qrCode(activityNo) {
  return request({
    url: "/tool/qrCode/create",
    method: "get",
    params: { content: activityNo },
  });
}
